using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;

namespace EquityXOI
{
    public class AuthenticationConfigModel
    {
        private string m_Url;

        public string Url
        {
            get { return m_Url; }
            set { m_Url = value; }
        }

        private Dictionary<string, string> m_NameValueCollection;

        public Dictionary<string, string> NameValueCollection
        {
            get { return m_NameValueCollection; }
            set { m_NameValueCollection = value; }
        }
	

        private AuthenticationWay m_AuthenWay;

        public AuthenticationWay AuthenWay
        {
            get { return m_AuthenWay; }
            set { m_AuthenWay = value; }
        }

        private long m_UsefulLife;

        public long UsefulLife
        {
            get { return m_UsefulLife; }
            set { m_UsefulLife = value; }
        }

        private string m_TestUrl;

        public string TestUrl
        {
            get { return m_TestUrl; }
            set { m_TestUrl = value; }
        }

        private string m_SuccFeature;

        public string SuccessFeature
        {
            get { return m_SuccFeature; }
            set { m_SuccFeature = value; }
        }

        private string m_FailedFeature;

        public string FailedFeature
        {
            get { return m_FailedFeature; }
            set { m_FailedFeature = value; }
        }

        private string m_Name;

        public string Name
        {
            get { return m_Name; }
            set { m_Name = value; }
        }

        private bool m_Enable;

        public bool Enable
        {
            get { return m_Enable; }
            set { m_Enable = value; }
        }

        public string GetQueryString()
        {
            if (m_NameValueCollection == null) return string.Empty;

            StringBuilder sbQueryString = new StringBuilder();

            foreach (KeyValuePair<string, string> entry in m_NameValueCollection)
            {
                sbQueryString.AppendFormat("&{0}={1}", entry.Key, entry.Value);
            }
            return sbQueryString.ToString();
        }

    }

    public enum AuthenticationWay
    {
        Cookie = 1
    }
}
